projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb30f56
)
Improve which-key--any-match-p
author
Justin Burkett
<justin@burkett.cc>
Tue, 18 Apr 2017 12:01:40 +0000
(08:01 -0400)
committer
Justin Burkett
<justin@burkett.cc>
Tue, 18 Apr 2017 12:01:40 +0000
(08:01 -0400)
which-key.el
patch
|
blob
|
history
diff --git
a/which-key.el
b/which-key.el
index 825e1cb0377b31c22cb99e377aea2d46b0e1bcdc..6cc4fd9fc316d68b34f5a5b3313660c7830f993a 100644
(file)
--- a/
which-key.el
+++ b/
which-key.el
@@
-2023,11
+2023,10
@@
prefix) if `which-key-use-C-h-commands' is non nil."
(defun which-key--any-match-p (regexps string)
"Non-nil if any of REGEXPS match STRING."
- (
let (match)
+ (
catch 'match
(dolist (regexp regexps)
(when (string-match-p regexp string)
- (setq match t)))
- match))
+ (throw 'match t)))))
(defun which-key--try-2-side-windows (keys page-n loc1 loc2 &rest _ignore)
"Try to show KEYS (PAGE-N) in LOC1 first. Only if no keys fit fallback to LOC2."